package com.mapbased.cc.valid;

import com.mapbased.wfw.RenderContext;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: mapbased.com</p>
 *
 * @author chy_hs(Baily)
 * @version 1.0
 */
public class EMail
    implements Validator
{
    /**
     *
     * @param value String
     * @return boolean
     * @todo Implement this com.mapbased.cc.valid.Validator method
     */
    public boolean isValid(String value,RenderContext rc)
    {
        int i=value.indexOf('@');
        if(i<1)
            return false;
        return value.lastIndexOf('.')>i;

    }

    public String toString()
    {
        return "输入格式不正确.";
    }
}
